home *** CD-ROM | disk | FTP | other *** search
/ EDUCORP 8 / Educorp2Compilation.sit / educorp2 / Demos / Fullwrite Demo / FullWrite Demo / FullWrite Demo.rsrc / PREC_103 < prev    next >
Encoding:
Text File  |  1988-01-11  |  5.1 KB  |  343 lines

  1. %%Title: (FullWrite[tm] PostScript Header)
  2. %%Creator: (Ann Arbor Softworks, Inc.)
  3. % (C) Copyright 1987 Ann Arbor Softworks, Inc.  All Rights Reserved.
  4. %%EndComments
  5. %%BeginProcSet (FullWriteProcSet) 1.0 1
  6. /FW 200 dict def FW begin
  7. /Fd{bind def}bind def
  8. /Fx{exch def}bind def
  9. /Wdv save 72. 0. matrix defaultmatrix dtransform
  10. dup mul exch dup mul add sqrt exch restore def
  11. /Wpt 8 string def
  12. currentscreen/Wzc Fx/Wzb Fx/Wza Fx
  13. % Next line defines type of screen used for grays.
  14. /Wzz 00000 def
  15. /Frd{
  16. Wdv mul 72 div round 72 mul Wdv div
  17. }Fd
  18. /Fxy{
  19. Frd exch Frd exch
  20. }Fd
  21. /Frc{
  22. 1 index 3 index
  23. 4 2 roll
  24. 5 index 1 index
  25. 1 index 5 index
  26. }Fd
  27. /Fr{
  28. Frc
  29. moveto lineto lineto lineto lineto
  30. }Fd
  31. /Far{
  32. 3 index 3 index W2 arcto 4{pop}repeat
  33. }Fd
  34. /Frr{
  35. 2 index 5 index sub 1 sub 2 div
  36. 2 index 5 index sub 1 sub 2 div
  37. 2 copy ge{exch}if pop
  38. 2 copy ge{exch}if pop
  39. /W2 Fx
  40. Frc
  41. 3 index 3 index
  42. 12 2 roll
  43. W2 add moveto Far Far Far Far
  44. pop pop
  45. }Fd
  46. /Fss{
  47. Wza
  48. Wzz 0 ne
  49. {pop Wzz -1 ne
  50. {pop Wzz}
  51. if}
  52. {exch 25 mod 0 eq
  53. {pop Wdv 4 div}
  54. if}
  55. ifelse
  56. Wzb/Wzc load setscreen
  57. }Fd
  58. /Fsg{
  59. dup Fss
  60. cvr 100. div 1. exch sub setgray
  61. }Fd
  62. /Fp{
  63. 64. div setgray
  64. Wpt copy pop
  65. 0 eq{0}{90}ifelse 9.375 exch
  66. {1 add 4 mul cvi Wpt exch get exch 1 add 4 mul cvi 7 sub bitshift 1 and}
  67. setscreen
  68. }Fd
  69. /Fs{
  70. gsave
  71. 0 setgray 2 setlinecap
  72. exec
  73. stroke
  74. grestore
  75. }Fd
  76. /Ff{
  77. gsave
  78. exch Fsg
  79. newpath exec closepath
  80. fill
  81. grestore
  82. }Fd
  83. /Fsh{
  84. gsave
  85. exch Fsg
  86. exch/W1 Fx
  87. W1 dup translate
  88. newpath W3 copy W3 -1 roll 1 add W3 1 roll exec closepath clip
  89. newpath
  90. W3 copy exec
  91. W1 neg dup translate
  92. exec closepath eofill
  93. grestore
  94. }Fd
  95. /Fsw{
  96. dup 0 le{pop .25}if setlinewidth
  97. }Fd
  98. /Fmf{
  99. /Wt6/Times-Roman findfont [6 0 0 -6 0 0] makefont def
  100. }Fd
  101. /Fln{
  102. /Wt6 where{pop}{Fmf}ifelse
  103. gsave
  104. moveto
  105. 0 setgray Wt6 setfont dup stringwidth pop neg 2 rmoveto show
  106. grestore
  107. }Fd
  108. /Fff{
  109. currentfont/FontInfo known
  110. {/W2 currentfont/FontInfo get def
  111. dup W2 exch known
  112. {W2 exch get true}
  113. {pop false}
  114. ifelse
  115. }
  116. {pop false}
  117. ifelse
  118. }Fd
  119. /Fgv{
  120. Fff
  121. {3 1 roll pop pop 0 exch currentfont/FontMatrix get dtransform exch pop}
  122. {div}
  123. ifelse
  124. Frd
  125. }Fd
  126. /Fup{
  127. 10/UnderlinePosition Fgv abs
  128. }Fd
  129. /Fuw{
  130. 15/UnderlineThickness Fgv abs
  131. }Fd
  132. /Fuu{
  133. Fxy newpath
  134. W3
  135. {moveto 0 currentlinewidth 2 div rmoveto
  136. Frd dup 0 rlineto            
  137. 0 currentlinewidth neg rlineto
  138. neg 0 rlineto
  139. 0 currentlinewidth rlineto
  140. currentlinewidth .25 Frd setlinewidth
  141. gsave 1 setgray fill grestore stroke
  142. setlinewidth}
  143. {moveto Frd 0 rlineto stroke}
  144. ifelse
  145. }Fd
  146. /Fnp{
  147. /Wa Fx 0 setgray/W3 false def 
  148. }Fd
  149. /Flp{
  150. Fnp Fsg
  151. }Fd
  152. /Fop{
  153. /Wa Fx Fsg/W3 true def 
  154. }Fd
  155. /Ful{
  156. gsave
  157. [] 0 setdash 0 setlinecap
  158. exch Wa Fup add exch
  159. Wa Fuw
  160. exch 1 eq
  161. {setlinewidth Fuu}
  162. {dup .45 mul Frd dup setlinewidth
  163. exch .15 mul dup 1 lt{pop 1}if add Frd
  164. 4 copy pop Fuu add Fuu}
  165. ifelse
  166. grestore
  167. }Fd
  168. /Fto{
  169. sub/W3 true def 
  170. }Fd
  171. /Fts{
  172. .5 mul dup 4 1 roll sub 3 1 roll exch add exch/W3 false def 
  173. }Fd
  174. /Fsu{
  175. gsave 4 copy 3 1 roll Wa Fuw Fts 3 -1 roll 0 setgray Ful grestore
  176. 3 1 roll Wa Fuw Fto 3 -1 roll Ful
  177. }Fd
  178. /Fdu{
  179. gsave
  180. [.25 1.5] 0 setdash 0 setlinecap 0 setgray
  181. exch Wa Fup add exch
  182. 72 Wdv div setlinewidth
  183. 1 eq
  184. {Fuu}
  185. {3 copy Fuu 1.25 add Fuu}
  186. ifelse
  187. grestore
  188. }Fd
  189. /Ftl{
  190. gsave
  191. [] 0 setdash 0 setlinecap
  192. Wa Fuw dup setlinewidth 2 div neg add Fuu
  193. grestore
  194. }Fd
  195. /Fsl{
  196. currentlinewidth 4 1 roll
  197. Wa Fuw setlinewidth 
  198. gsave 3 copy currentlinewidth Fts 0 setgray Ftl grestore
  199. currentlinewidth Fto Ftl
  200. setlinewidth
  201. }Fd
  202. /Fshow{
  203. show
  204. }Fd
  205. /Fi{
  206. count 1 sub exch roll/Fi count 1 roll
  207. }Fd
  208. /StartTransform{
  209. currentpoint
  210. count -5 roll
  211. 4 index 4 index translate
  212. rotate
  213. scale
  214. neg exch neg exch translate
  215. moveto
  216. }Fd
  217. /Fgs{
  218. Wk 4 and 0 ne
  219. {count -1 roll}
  220. {100}
  221. ifelse
  222. Fsg
  223. Wk 8 and 0 ne
  224. {StartTransform}
  225. if
  226. }Fd
  227. /Fg{
  228. count -4 roll
  229. /Wk Fx
  230. /Wh Fx
  231. /Wd Fx
  232. pop
  233. Wk 1 and 0 ne
  234. {count -2 roll}
  235. {0 0}
  236. ifelse
  237. 2 copy rmoveto
  238. /Wdy Fx/Wdx Fx
  239. Wk 2 and 0 ne
  240. {count -1 roll}
  241. {0}
  242. ifelse
  243. /Wi exch def
  244. Wk 3 gt
  245. {Fgs}
  246. if
  247. Fex
  248. }Fd
  249. /Fcc{
  250. /Wb 0 def
  251. /Wc 0 def
  252. {32 eq{/Wb Wb 1 add def}if
  253. /Wc Wc 1 add def}
  254. forall
  255. }Fd
  256. /Fq0{
  257. gsave Fg
  258. Wi Wb mul add
  259. Wh sub neg Wd div
  260. /Wj Fx
  261. Wi 0 32 Wj 0 6 -1 roll awidthshow
  262. currentpoint grestore moveto Wdx neg Wdy neg rmoveto
  263. }Fd
  264. /Fq1{
  265. count 2 sub -1 roll pop
  266. count 2 sub Wl -2 mul roll
  267. gsave Fg
  268. Wg Wi We mul add
  269. Wh sub neg Wd div/Wj Fx
  270. 1 1 Wl
  271. {pop setfont Wi 0 32 Wj 0 6 -1 roll awidthshow}
  272. for
  273. currentpoint grestore moveto Wdx neg Wdy neg rmoveto
  274. }Fd
  275. /Fq2{
  276. /Wg Fx
  277. currentfont count 2 sub 2 roll
  278. /Wl 1 def
  279. /We Wb def
  280. /Wf Wc def
  281. /Fq4 count 2 sub 1 roll
  282. }Fd
  283. /Fq3{
  284. Wg add/Wg Fx
  285. currentfont count 3 sub 2 roll
  286. /Wl Wl 1 add def
  287. /We We Wb add def
  288. /Wf Wf Wc add def
  289. Wf count 2 sub index eq
  290. {Fq1}
  291. if
  292. }Fd
  293. /Fq4{
  294. count 3 sub index
  295. /Fq4 eq
  296. {Fq3}
  297. {Fq2}
  298. ifelse
  299. }Fd
  300. /Fq5{
  301. dup Fcc
  302. dup stringwidth pop
  303. count 2 sub index Wc eq
  304. {Fq0}
  305. {Fq4}
  306. ifelse
  307. }Fd
  308. /Frl{
  309. dup/Wx Fx count 1 sub exch roll
  310. Wx count 1 roll/Wx count 1 roll
  311. }Fd
  312. /Fex{
  313. count 1 sub index/Wx eq
  314. {/Wx count -2 roll exch pop count 1 sub exch neg roll
  315. {dup/Wx eq{exit}{load exec}ifelse}loop pop}
  316. if
  317. }Fd
  318. /show{
  319. count 1 sub index/Fi eq
  320. {Fq5}
  321. {Fshow}
  322. ifelse
  323. }Fd
  324. /zFnp{/Fnp}Fd
  325. /zFlp{/Flp}Fd
  326. /zFop{/Fop}Fd
  327. /zFul{/Ful}Fd
  328. /zFsu{/Fsu}Fd
  329. /zFdu{/Fdu}Fd
  330. /zFtl{/Ftl}Fd
  331. /zFsl{/Fsl}Fd
  332. /Fgr{
  333. setgray
  334. }Fd
  335. /setgray{
  336. dup 100. mul round cvi Fss
  337. Fgr
  338. }Fd
  339. /Fapg{64. div Fgr}Fd
  340. /gr{64. div setgray}Fd
  341. /pat{Wpt copy pop 9.375 pa por not{90 add}if{1 add 4 mul cvi Wpt exch get exch 1 add 4 mul cvi 7 sub bitshift 1 and}setscreen Fapg}Fd
  342. %% End of FullWrite ProcSet
  343.